using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._AnalysisTools._Extract
{
    /// <summary>
    /// <para>Split</para>
    /// <para>Splits an input with overlaying features to  create a subset of output feature classes.</para>
    /// <para>使用叠加要素拆分输入以创建输出要素类的子集。</para>
    /// </summary>    
    [DisplayName("Split")]
    public class Split : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Split()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The features to be split.</para>
        /// <para>要拆分的功能。</para>
        /// </param>
        /// <param name="_split_features">
        /// <para>Split Features</para>
        /// <para>Polygon features containing a tabular field whose unique values are used to split the input features and provide the output feature classes' names.</para>
        /// <para>包含表格字段的面要素，其唯一值用于分割输入要素并提供输出要素类的名称。</para>
        /// </param>
        /// <param name="_split_field">
        /// <para>Split Field</para>
        /// <para>The character field used to split the input features. This field's values identify the split features used to create each output feature class. The split field's unique values provide the output feature classes' names.</para>
        /// <para>用于拆分输入要素的字符字段。此字段的值用于标识用于创建每个输出要素类的分割要素。分割字段的唯一值提供输出要素类的名称。</para>
        /// </param>
        /// <param name="_out_workspace">
        /// <para>Target Workspace</para>
        /// <para>The existing workspace where the output feature classes are stored.</para>
        /// <para>存储输出要素类的现有工作空间。</para>
        /// </param>
        public Split(object _in_features, object _split_features, object _split_field, object _out_workspace)
        {
            this._in_features = _in_features;
            this._split_features = _split_features;
            this._split_field = _split_field;
            this._out_workspace = _out_workspace;
        }
        public override string ToolboxName => "Analysis Tools";

        public override string ToolName => "Split";

        public override string CallName => "analysis.Split";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYDomain", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "configKeyword", "extent", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "parallelProcessingFactor"];

        public override object[] ParameterInfo => [_in_features, _split_features, _split_field, _out_workspace, _cluster_tolerance, _out_workspace2];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The features to be split.</para>
        /// <para>要拆分的功能。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Split Features</para>
        /// <para>Polygon features containing a tabular field whose unique values are used to split the input features and provide the output feature classes' names.</para>
        /// <para>包含表格字段的面要素，其唯一值用于分割输入要素并提供输出要素类的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Split Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _split_features { get; set; }


        /// <summary>
        /// <para>Split Field</para>
        /// <para>The character field used to split the input features. This field's values identify the split features used to create each output feature class. The split field's unique values provide the output feature classes' names.</para>
        /// <para>用于拆分输入要素的字符字段。此字段的值用于标识用于创建每个输出要素类的分割要素。分割字段的唯一值提供输出要素类的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Split Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _split_field { get; set; }


        /// <summary>
        /// <para>Target Workspace</para>
        /// <para>The existing workspace where the output feature classes are stored.</para>
        /// <para>存储输出要素类的现有工作空间。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_workspace { get; set; }


        /// <summary>
        /// <para>XY Tolerance</para>
        /// <para><xdoc>
        ///   <para>The minimum distance separating all feature coordinates (nodes and vertices) as well as the distance a coordinate can move in X or Y (or both). Set the value to be higher for data that has less coordinate accuracy and lower for datasets with extremely high accuracy.</para>
        ///   <para>Changing this parameter's value may cause failure or unexpected results. It is recommended that this parameter not be modified. It has been removed from view in the tool dialog. By default, the input feature class's spatial reference x,y tolerance property is used.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>分隔所有要素坐标（节点和折点）的最小距离，以及坐标可以在 X 或 Y（或两者）中移动的距离。对于坐标精度较低的数据，将该值设置为较高，对于具有极高精度的数据集，将该值设置为较低。</para>
        ///   <para>更改此参数的值可能会导致失败或意外结果。建议不要修改该参数。它已从工具对话框的视图中删除。默认情况下，将使用输入要素类的空间参考 x，y 容差属性。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("XY Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _cluster_tolerance { get; set; } = null;


        /// <summary>
        /// <para>Updated Target Workspace</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Target Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_workspace2 { get; set; }


        public Split SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYDomain = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, object configKeyword = null, object extent = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, object parallelProcessingFactor = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYDomain: XYDomain, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, configKeyword: configKeyword, extent: extent, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, parallelProcessingFactor: parallelProcessingFactor);
            return this;
        }

    }

}